package com.platform.module.dao.service.impl;

import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.platform.module.dao.entity.TbUser;
import com.platform.module.dao.mapper.TbUserMapper;
import com.platform.module.dao.service.TbUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户表 服务实现类
 * </p>
 *
 * @author ZM
 * @since 2025-01-07
 */
@Service
public class TbUserServiceImpl extends ServiceImpl<TbUserMapper, TbUser> implements TbUserService {

    @Override
    public TbUser findUserByCmobilenomd5(String phoneMd5) {
        LambdaQueryChainWrapper<TbUser> queryChainWrapper = new LambdaQueryChainWrapper<>(getBaseMapper());
        return queryChainWrapper.eq(TbUser::getCmobilenomd5, phoneMd5)
                .one();
    }
}
